import wx

class MainFrame(wx.Frame):
	def __init__(self, parent, title):
		super(MainFrame, self).__init__(parent, title=title, size=(500, 400))
		self.Show()
		
	def initUI(self):
		menuBar = wx.MenuBar()
		viewMenu = wx.Menu()
		
		employeesView = viewMenu.Append(wx.ID_ANY, 'Employees View', 'Set view to employee browser')
		coursesView = viewMenu.Append(wx.ID_ANY, 'Courses View', 'Set view to courses browser')
		educationView = viewMenu.Append(wx.ID_ANY, 'Education View', 'Set view to education browser')
		jobsView = viewMenu.Append(wx.ID_ANY, 'Jobs View', 'Set view to jobs browser')
		
		menuBar.Append(viewMenu, 'View')
		self.SetMenuBar(menuBar)
		
		self.Bind(wx.EVT_MENU, self.setEmployeesView, employeesView)
		
		# Adding browser list and search bar. Default view is for Employees
		self.setEmployeesView(None)
		
	def setEmployeesView(self, e):		
		panel = wx.Panel(self)
		vbox = wx.BoxSizer(wx.VERTICAL)
		panel.SetBackgroundColour('#4f5049')
		
		leftPane = wx.Panel(panel)
		leftPane.SetBackgroundColour('#ededed')
		
		searchPanel = wx.Panel(leftPane)
		box = wx.BoxSizer(wx.HORIZONTAL)
		textSearch = wx.TextCtrl(searchPanel)
		box.Add(textSearch)
		
		btnSearch = wx.Button(searchPanel)
		box.Add(btnSearch)
		searchPanel.SetSizer(box)		
		
		employeesList = wx.ListBox(leftPane)
		vbox.Add(searchPanel, 1, wx.ALIGN_TOP)
		vbox.Add(employeesList, wx.ALIGN_CENTER)
		vbox.Add(leftPane, 1, wx.ALIGN_LEFT | wx.ALL, 20)
		panel.SetSizer(vbox)
		
		
		

if __name__ == '__main__':
	app = wx.App()
	mainframe = MainFrame(None, 'PyGem client v1.0')
	mainframe.initUI()
	app.MainLoop()